<?include("../../config/config.php");
$DM->loadClass("tracker","log");
// create and instance class
$object_log = new log();
$object_log->id_log = array_key_exists("id_log",$_POST)?$_POST["id_log"]:""; 
$object_log->id_site = array_key_exists("id_site",$_POST)?$_POST["id_site"]:""; 
$object_log->id_uagent = array_key_exists("id_uagent",$_POST)?$_POST["id_uagent"]:""; 
$object_log->id_charset = array_key_exists("id_charset",$_POST)?$_POST["id_charset"]:""; 
$object_log->id_lang = array_key_exists("id_lang",$_POST)?$_POST["id_lang"]:""; 
$object_log->id_page = array_key_exists("id_page",$_POST)?$_POST["id_page"]:""; 
$object_log->id_query = array_key_exists("id_query",$_POST)?$_POST["id_query"]:""; 
$object_log->ip4 = array_key_exists("ip4",$_POST)?$_POST["ip4"]:""; 
$object_log->ip6 = array_key_exists("ip6",$_POST)?$_POST["ip6"]:""; 
$object_log->timestamp = array_key_exists("timestamp",$_POST)?$_POST["timestamp"]:""; 
if ($object_log->save()){
	header("Location: log.list.php");
}else{
	exit("Erro ao salvar log");
}
?>
